home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist / dist6.3 / motif_dev.idb / usr / include / Sgm / ListP.h.z / ListP.h
C/C++ Source or Header  |  1996-12-06  |  6KB  |  200 lines

  1. /*******************************************************************************
  2. ///////   Copyright 1992, Silicon Graphics, Inc.  All Rights Reserved.   ///////
  3. //                                                                            //
  4. // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;     //
  5. // the contents of this file may not be disclosed to third parties, copied    //
  6. // or duplicated in any form, in whole or in part, without the prior written  //
  7. // permission of Silicon Graphics, Inc.                                       //
  8. //                                                                            //
  9. // RESTRICTED RIGHTS LEGEND:                                                  //
  10. // Use,duplication or disclosure by the Government is subject to restrictions //
  11. // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data     //
  12. // and Computer Software clause at DFARS 252.227-7013, and/or in similar or   //
  13. // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -    //
  14. // rights reserved under the Copyright Laws of the United States.             //
  15. //                                                                            //
  16. *******************************************************************************/
  17. #ifndef _SgListP_h
  18. #define _SgListP_h
  19.  
  20. #include "List.h"
  21. #include <Xm/PrimitiveP.h>
  22. #include "ScrollBar.h"
  23. #include <Xm/ScrolledW.h>
  24.  
  25. /*  List struct passed to Convert proc for drag and drop */
  26. typedef struct _SgListDragConvertStruct
  27. {
  28.    Widget     w;
  29.    XmString  *strings;
  30.    int        num_strings;
  31. } SgListDragConvertStruct;
  32.  
  33. /*  List class structure  */
  34.  
  35. typedef struct _SgListClassPart
  36. {
  37.    int foo;    /*  No new fields needed  */
  38. #ifdef __sgi /* Allow future extensions without breaking shared library compatibility */
  39.     caddr_t _SG_vendorExtension;
  40. #endif /* __sgi */
  41. } SgListClassPart;
  42.  
  43.  
  44. /*  Full class record declaration for List class  */
  45.  
  46. typedef struct _SgListClassRec
  47. {
  48.    CoreClassPart        core_class;
  49.    XmPrimitiveClassPart primitive_class;
  50.    SgListClassPart     list_class;
  51. } SgListClassRec;
  52.  
  53. externalref SgListClassRec sgListClassRec;
  54.  
  55. /****************
  56.  *
  57.  * Internal form of the list elements.
  58.  *
  59.  ****************/
  60.  
  61. typedef    struct {
  62.     _XmString    name;
  63.     Dimension    height;
  64.     Dimension    width;
  65.     Dimension    CumHeight;
  66.     Boolean        selected;
  67.     Boolean        last_selected;
  68.     Boolean        LastTimeDrawn;
  69.     unsigned short    NumLines;
  70.     int        length;
  71.     GC            gc;
  72.     XmFontList     font;
  73.     Pixmap             icon;
  74.     short           iconWidth, iconHeight;
  75.     short           indent;
  76. } SgListElement, *SgListElementPtr;
  77.  
  78. /*  The List instance record  */
  79.  
  80. typedef struct _SgListPart
  81. {
  82.     short           ItemSpacing;
  83.     Dimension       margin_width;
  84.     Dimension        margin_height;
  85.     XmFontList     font;
  86.     XmString    *items;
  87.     int        itemCount;
  88.     XmString    *selectedItems;
  89.     int             *selectedIndices;
  90.     int        selectedItemCount;
  91.     int         visibleItemCount;
  92.     int         LastSetVizCount;
  93.     unsigned char    SelectionPolicy;
  94.     unsigned char    ScrollBarDisplayPolicy;
  95.     unsigned char    SizePolicy;
  96.     XmStringDirection StrDir;
  97.  
  98.     Boolean        AutoSelect;
  99.     Boolean        DidSelection;
  100.     Boolean        FromSetSB;
  101.     Boolean        FromSetNewSize;
  102.     Boolean        AddMode;
  103.     unsigned char    LeaveDir;
  104.     unsigned char    HighlightThickness;
  105.     int         ClickInterval;
  106.     XtIntervalId    DragID;
  107.     XtCallbackList     SingleCallback;
  108.     XtCallbackList     MultipleCallback;
  109.     XtCallbackList     ExtendCallback;
  110.     XtCallbackList     BrowseCallback;
  111.     XtCallbackList     DefaultCallback;
  112.     
  113.     GC        NormalGC;    
  114.     GC        InverseGC;
  115.     GC        HighlightGC;
  116.     Pixmap          DashTile;
  117.     SgListElementPtr    *InternalList;
  118.     int        LastItem;
  119.     int        FontHeight;
  120.     int        top_position;
  121.     char        Event;
  122.     int        LastHLItem;
  123.     int        StartItem;
  124.     int        OldStartItem;
  125.     int        EndItem;
  126.     int        OldEndItem;
  127.     Position    BaseX;
  128.     Position    BaseY;
  129.     Boolean        MouseMoved;
  130.     Boolean        AppendInProgress;
  131.     Boolean        Traversing;
  132.     Boolean        KbdSelection;
  133.     short        DownCount;
  134.     Time        DownTime;
  135.     int        CurrentKbdItem;    /* 0 to n-1, -1 means empty list. */
  136.     unsigned char    SelectionType;
  137.     GC        InsensitiveGC;
  138.     
  139.     
  140.     int vmin;          /*  slider minimum coordiate position     */
  141.     int vmax;          /*  slider maximum coordiate position     */
  142.     int vOrigin;          /*  slider edge location                  */
  143.     int vExtent;          /*  slider size                           */
  144.     
  145.     int hmin;          /*  Same as above for horizontal bar.     */
  146.     int hmax;
  147.     int hOrigin;
  148.     int hExtent;
  149.     
  150.     Dimension    MaxWidth;
  151.     Dimension    CharWidth;
  152.     Position    XOrigin;
  153.     
  154.     SgScrollBarWidget       hScrollBar;
  155.     SgScrollBarWidget       vScrollBar;
  156.     XmScrolledWindowWidget  Mom;
  157.     Dimension    MaxItemHeight;
  158.     
  159.     Boolean      hasIcons;
  160.     Boolean      update;
  161.     short        iconWidth;
  162.     int          indicatedIcon;
  163.     int          *fields;
  164.     int          numFields;
  165.     int          selectedField;
  166.     Pixel          arm_color;
  167.     int          field_margin;
  168.     Dimension    spacing;
  169.     XtCallbackList     IconActivateCallback;
  170.     XtCallbackList     IconDisarmCallback;
  171.     XtCallbackList     IconArmCallback;
  172.     XtCallbackList     FieldChangedCallback;
  173.     GC        ArmGC;    
  174.     GC        IconGC;    
  175.     Boolean     indentIcons;
  176.     Dimension   defaultIconWidth;
  177. #ifdef __sgi /* Allow future extensions without breaking shared library compatibility */
  178.     caddr_t _SG_vendorExtension;
  179. #endif /* __sgi */
  180. } SgListPart;
  181.  
  182.  
  183. /*  Full instance record declaration  */
  184.  
  185. typedef struct _SgListRec
  186. {
  187.    CorePart       core;
  188.    XmPrimitivePart primitive;
  189.    SgListPart       list;
  190. } SgListRec;
  191.  
  192.  
  193. /* BEGIN OSF Fix pir 2661 */
  194. /* Access Macros */
  195. #define POS_IsSelected(lw,pos) (((SgListWidget)(lw))->list.InternalList[(pos)]->selected)
  196. /* END OSF Fix pir 2661 */
  197.  
  198. #endif /* _SgListP_h */
  199. /* DON'T ADD ANYTHING AFTER THIS #endif */
  200.